3.793 \(\int (d \cot (e+f x))^n (a+i a \tan (e+f x))^m \, dx\)

Optimal. Leaf size=95 \[ \frac{\tan (e+f x) (1+i \tan (e+f x))^{-m} (a+i a \tan (e+f x))^m (d \cot (e+f x))^n F_1(1-n;1-m,1;2-n;-i \tan (e+f x),i \tan (e+f x))}{f (1-n)} \]

[Out]

(AppellF1[1 - n, 1 - m, 1, 2 - n, (-I)*Tan[e + f*x], I*Tan[e + f*x]]*(d*Cot[e + f*x])^n*Tan[e + f*x]*(a + I*a*
Tan[e + f*x])^m)/(f*(1 - n)*(1 + I*Tan[e + f*x])^m)

________________________________________________________________________________________

Rubi [A]  time = 0.164415, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {4241, 3564, 135, 133} \[ \frac{\tan (e+f x) (1+i \tan (e+f x))^{-m} (a+i a \tan (e+f x))^m (d \cot (e+f x))^n F_1(1-n;1-m,1;2-n;-i \tan (e+f x),i \tan (e+f x))}{f (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[(d*Cot[e + f*x])^n*(a + I*a*Tan[e + f*x])^m,x]

[Out]

(AppellF1[1 - n, 1 - m, 1, 2 - n, (-I)*Tan[e + f*x], I*Tan[e + f*x]]*(d*Cot[e + f*x])^n*Tan[e + f*x]*(a + I*a*
Tan[e + f*x])^m)/(f*(1 - n)*(1 + I*Tan[e + f*x])^m)

Rule 4241

Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Dist[(c*Cot[a + b*x])^m*(c*Tan[a + b*x])^m, Int[A
ctivateTrig[u]/(c*Tan[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownTangentIntegrandQ
[u, x]

Rule 3564

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dis
t[(a*b)/f, Subst[Int[((a + x)^(m - 1)*(c + (d*x)/b)^n)/(b^2 + a*x), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b,
 c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 135

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[(c^IntPart[n]*(c +
d*x)^FracPart[n])/(1 + (d*x)/c)^FracPart[n], Int[(b*x)^m*(1 + (d*x)/c)^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d
, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]

Rule 133

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(c^n*e^p*(b*x)^(m +
 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*x)/c), -((f*x)/e)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rubi steps

\begin{align*} \int (d \cot (e+f x))^n (a+i a \tan (e+f x))^m \, dx &=\left ((d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \int (d \tan (e+f x))^{-n} (a+i a \tan (e+f x))^m \, dx\\ &=\frac{\left (i a^2 (d \cot (e+f x))^n (d \tan (e+f x))^n\right ) \operatorname{Subst}\left (\int \frac{\left (-\frac{i d x}{a}\right )^{-n} (a+x)^{-1+m}}{-a^2+a x} \, dx,x,i a \tan (e+f x)\right )}{f}\\ &=\frac{\left (i a (d \cot (e+f x))^n (1+i \tan (e+f x))^{-m} (d \tan (e+f x))^n (a+i a \tan (e+f x))^m\right ) \operatorname{Subst}\left (\int \frac{\left (-\frac{i d x}{a}\right )^{-n} \left (1+\frac{x}{a}\right )^{-1+m}}{-a^2+a x} \, dx,x,i a \tan (e+f x)\right )}{f}\\ &=\frac{F_1(1-n;1-m,1;2-n;-i \tan (e+f x),i \tan (e+f x)) (d \cot (e+f x))^n (1+i \tan (e+f x))^{-m} \tan (e+f x) (a+i a \tan (e+f x))^m}{f (1-n)}\\ \end{align*}

Mathematica [F]  time = 5.34427, size = 0, normalized size = 0. \[ \int (d \cot (e+f x))^n (a+i a \tan (e+f x))^m \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(d*Cot[e + f*x])^n*(a + I*a*Tan[e + f*x])^m,x]

[Out]

Integrate[(d*Cot[e + f*x])^n*(a + I*a*Tan[e + f*x])^m, x]

________________________________________________________________________________________

Maple [F]  time = 0.792, size = 0, normalized size = 0. \begin{align*} \int \left ( d\cot \left ( fx+e \right ) \right ) ^{n} \left ( a+ia\tan \left ( fx+e \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*cot(f*x+e))^n*(a+I*a*tan(f*x+e))^m,x)

[Out]

int((d*cot(f*x+e))^n*(a+I*a*tan(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (d \cot \left (f x + e\right )\right )^{n}{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*(a+I*a*tan(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate((d*cot(f*x + e))^n*(I*a*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\left (\frac{2 \, a e^{\left (2 i \, f x + 2 i \, e\right )}}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{m} \left (\frac{i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} - 1}\right )^{n}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*(a+I*a*tan(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((2*a*e^(2*I*f*x + 2*I*e)/(e^(2*I*f*x + 2*I*e) + 1))^m*((I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x +
2*I*e) - 1))^n, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))**n*(a+I*a*tan(f*x+e))**m,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (d \cot \left (f x + e\right )\right )^{n}{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{m}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*cot(f*x+e))^n*(a+I*a*tan(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((d*cot(f*x + e))^n*(I*a*tan(f*x + e) + a)^m, x)